(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

lessElements(l, t) → lessE(l, t, 0)
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0) → false
le(0, m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Rewrite Strategy: FULL

(1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
length(cons(n, l)) →+ s(length(l))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0].
The pumping substitution is [l / cons(n, l)].
The result substitution is [ ].

(2) BOUNDS(n^1, INF)

(3) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(4) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

S is empty.
Rewrite Strategy: FULL

(5) SlicingProof (LOWER BOUND(ID) transformation)

Sliced the following arguments:
cons/0
node/1

(6) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, t2)) → append(toList(t1), cons(toList(t2)))
append(nil, l2) → l2
append(cons(l1), l2) → cons(append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

S is empty.
Rewrite Strategy: FULL

(7) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(8) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, t2)) → append(toList(t1), cons(toList(t2)))
append(nil, l2) → l2
append(cons(l1), l2) → cons(append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s

(9) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
lessE, le, length, toList, append

They will be analysed ascendingly in the following order:
le < lessE
length < lessE
toList < lessE
append < toList

(10) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, t2)) → append(toList(t1), cons(toList(t2)))
append(nil, l2) → l2
append(cons(l1), l2) → cons(append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s

Generator Equations:
gen_nil:cons:leaf:node5_0(0) ⇔ nil
gen_nil:cons:leaf:node5_0(+(x, 1)) ⇔ cons(gen_nil:cons:leaf:node5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))

The following defined symbols remain to be analysed:
le, lessE, length, toList, append

They will be analysed ascendingly in the following order:
le < lessE
length < lessE
toList < lessE
append < toList

(11) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)

Induction Base:
le(gen_0':s6_0(+(1, 0)), gen_0':s6_0(0)) →RΩ(1)
false

Induction Step:
le(gen_0':s6_0(+(1, +(n8_0, 1))), gen_0':s6_0(+(n8_0, 1))) →RΩ(1)
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) →IH
false

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(12) Complex Obligation (BEST)

(13) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, t2)) → append(toList(t1), cons(toList(t2)))
append(nil, l2) → l2
append(cons(l1), l2) → cons(append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s

Lemmas:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)

Generator Equations:
gen_nil:cons:leaf:node5_0(0) ⇔ nil
gen_nil:cons:leaf:node5_0(+(x, 1)) ⇔ cons(gen_nil:cons:leaf:node5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))

The following defined symbols remain to be analysed:
length, lessE, toList, append

They will be analysed ascendingly in the following order:
length < lessE
toList < lessE
append < toList

(14) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
length(gen_nil:cons:leaf:node5_0(n319_0)) → gen_0':s6_0(n319_0), rt ∈ Ω(1 + n3190)

Induction Base:
length(gen_nil:cons:leaf:node5_0(0)) →RΩ(1)
0'

Induction Step:
length(gen_nil:cons:leaf:node5_0(+(n319_0, 1))) →RΩ(1)
s(length(gen_nil:cons:leaf:node5_0(n319_0))) →IH
s(gen_0':s6_0(c320_0))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(15) Complex Obligation (BEST)

(16) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, t2)) → append(toList(t1), cons(toList(t2)))
append(nil, l2) → l2
append(cons(l1), l2) → cons(append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s

Lemmas:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)
length(gen_nil:cons:leaf:node5_0(n319_0)) → gen_0':s6_0(n319_0), rt ∈ Ω(1 + n3190)

Generator Equations:
gen_nil:cons:leaf:node5_0(0) ⇔ nil
gen_nil:cons:leaf:node5_0(+(x, 1)) ⇔ cons(gen_nil:cons:leaf:node5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))

The following defined symbols remain to be analysed:
append, lessE, toList

They will be analysed ascendingly in the following order:
toList < lessE
append < toList

(17) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
append(gen_nil:cons:leaf:node5_0(n575_0), gen_nil:cons:leaf:node5_0(b)) → gen_nil:cons:leaf:node5_0(+(n575_0, b)), rt ∈ Ω(1 + n5750)

Induction Base:
append(gen_nil:cons:leaf:node5_0(0), gen_nil:cons:leaf:node5_0(b)) →RΩ(1)
gen_nil:cons:leaf:node5_0(b)

Induction Step:
append(gen_nil:cons:leaf:node5_0(+(n575_0, 1)), gen_nil:cons:leaf:node5_0(b)) →RΩ(1)
cons(append(gen_nil:cons:leaf:node5_0(n575_0), gen_nil:cons:leaf:node5_0(b))) →IH
cons(gen_nil:cons:leaf:node5_0(+(b, c576_0)))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(18) Complex Obligation (BEST)

(19) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, t2)) → append(toList(t1), cons(toList(t2)))
append(nil, l2) → l2
append(cons(l1), l2) → cons(append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s

Lemmas:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)
length(gen_nil:cons:leaf:node5_0(n319_0)) → gen_0':s6_0(n319_0), rt ∈ Ω(1 + n3190)
append(gen_nil:cons:leaf:node5_0(n575_0), gen_nil:cons:leaf:node5_0(b)) → gen_nil:cons:leaf:node5_0(+(n575_0, b)), rt ∈ Ω(1 + n5750)

Generator Equations:
gen_nil:cons:leaf:node5_0(0) ⇔ nil
gen_nil:cons:leaf:node5_0(+(x, 1)) ⇔ cons(gen_nil:cons:leaf:node5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))

The following defined symbols remain to be analysed:
toList, lessE

They will be analysed ascendingly in the following order:
toList < lessE

(20) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol toList.

(21) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, t2)) → append(toList(t1), cons(toList(t2)))
append(nil, l2) → l2
append(cons(l1), l2) → cons(append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s

Lemmas:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)
length(gen_nil:cons:leaf:node5_0(n319_0)) → gen_0':s6_0(n319_0), rt ∈ Ω(1 + n3190)
append(gen_nil:cons:leaf:node5_0(n575_0), gen_nil:cons:leaf:node5_0(b)) → gen_nil:cons:leaf:node5_0(+(n575_0, b)), rt ∈ Ω(1 + n5750)

Generator Equations:
gen_nil:cons:leaf:node5_0(0) ⇔ nil
gen_nil:cons:leaf:node5_0(+(x, 1)) ⇔ cons(gen_nil:cons:leaf:node5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))

The following defined symbols remain to be analysed:
lessE

(22) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol lessE.

(23) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, t2)) → append(toList(t1), cons(toList(t2)))
append(nil, l2) → l2
append(cons(l1), l2) → cons(append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s

Lemmas:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)
length(gen_nil:cons:leaf:node5_0(n319_0)) → gen_0':s6_0(n319_0), rt ∈ Ω(1 + n3190)
append(gen_nil:cons:leaf:node5_0(n575_0), gen_nil:cons:leaf:node5_0(b)) → gen_nil:cons:leaf:node5_0(+(n575_0, b)), rt ∈ Ω(1 + n5750)

Generator Equations:
gen_nil:cons:leaf:node5_0(0) ⇔ nil
gen_nil:cons:leaf:node5_0(+(x, 1)) ⇔ cons(gen_nil:cons:leaf:node5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))

No more defined symbols left to analyse.

(24) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)

(25) BOUNDS(n^1, INF)

(26) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, t2)) → append(toList(t1), cons(toList(t2)))
append(nil, l2) → l2
append(cons(l1), l2) → cons(append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s

Lemmas:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)
length(gen_nil:cons:leaf:node5_0(n319_0)) → gen_0':s6_0(n319_0), rt ∈ Ω(1 + n3190)
append(gen_nil:cons:leaf:node5_0(n575_0), gen_nil:cons:leaf:node5_0(b)) → gen_nil:cons:leaf:node5_0(+(n575_0, b)), rt ∈ Ω(1 + n5750)

Generator Equations:
gen_nil:cons:leaf:node5_0(0) ⇔ nil
gen_nil:cons:leaf:node5_0(+(x, 1)) ⇔ cons(gen_nil:cons:leaf:node5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))

No more defined symbols left to analyse.

(27) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)

(28) BOUNDS(n^1, INF)

(29) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, t2)) → append(toList(t1), cons(toList(t2)))
append(nil, l2) → l2
append(cons(l1), l2) → cons(append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s

Lemmas:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)
length(gen_nil:cons:leaf:node5_0(n319_0)) → gen_0':s6_0(n319_0), rt ∈ Ω(1 + n3190)

Generator Equations:
gen_nil:cons:leaf:node5_0(0) ⇔ nil
gen_nil:cons:leaf:node5_0(+(x, 1)) ⇔ cons(gen_nil:cons:leaf:node5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))

No more defined symbols left to analyse.

(30) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)

(31) BOUNDS(n^1, INF)

(32) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, t2)) → append(toList(t1), cons(toList(t2)))
append(nil, l2) → l2
append(cons(l1), l2) → cons(append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s

Lemmas:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)

Generator Equations:
gen_nil:cons:leaf:node5_0(0) ⇔ nil
gen_nil:cons:leaf:node5_0(+(x, 1)) ⇔ cons(gen_nil:cons:leaf:node5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))

No more defined symbols left to analyse.

(33) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)

(34) BOUNDS(n^1, INF)